package the.broccoli.weixin.service.dto;

import com.alibaba.fastjson.JSON;
import lombok.Data;

import java.io.Serializable;

@Data
public class WeiXinPhoneNumber implements Serializable {
    private static final long serialVersionUID = -4114873607039412786L;
    private Integer errcode;
    private String errmsg;
    private PhoneInfo phone_info;

    public static WeiXinPhoneNumber fromJson(String json) {
        return JSON.parseObject(json, WeiXinPhoneNumber.class);
    }

    @Data
    public static class PhoneInfo implements Serializable {
        private static final long serialVersionUID = -2005576137485229057L;
        private String phoneNumber;
    }

}
